/**
 * @description 项目订单页面相关接口
 */

// 引入封装后的axios请求方法
import ajax from "./ajax";

/**
 * 订单页面获取商家接口
 * @param {{项目id}} id 
 * @returns Promise
 */
export function getBusinessApi(id){
    return ajax({
        baseURL:'/huazhuang',
        url:'/business/BusinessInfoByProjectId',
        params:{
            id
        }
    })
}

/**
 * 用户预约项目接口
 * @param {{预约项目对象}} objectItem 
 * @returns Promise
 */
export function createOrderApi(objectItem){
    return ajax({
        baseURL:'/huazhuang',
        url:'/order/createOrder',
        method:'POST',
        data:{
            token:objectItem.token,
            proname:objectItem.proname,
            makedate:objectItem.makedate,
            username:objectItem.username,
            usertell:objectItem.usertell,
            information:objectItem.information,
            // path:objectItem.path,
            busid:objectItem.busid,
            proid:objectItem.proid
        }
    })
}